<div id="comments">
<?foreach($comments as $key => $comment) {?>
	<p class="comment_author">
		<? echo $comment->getAuthor(); ?>
		<span class="tiny comment_date"><? echo strftime($hd->getDateFormat(), strtotime($content->getDate())); ?></span>
	</p>
	<div class="comment_top"></div>
	<div class="comment_body">
		<div class="comment_main"><? echo $hd->makeHTML($comment->getBody()); ?></div>
		<?if($hd->getPassword()==sha1($_SESSION['password'])) {?>
		<p class="small admin_action">
		<a href="<?echo $base_url;?>panel/comment/delete:<?echo $comment->getId();?>">Elimina commento</a>
		</p>
		<?}?>
	</div>
	<div class="comment_bottom"></div>
<?}?>


<h2 id="comment_headline">Commenta articolo</h2>
<div class="comment_top"></div>
<div class="comment_body">
<form id="comment_form" action="" method="post" accept-charset="utf-8" 
	onsubmit="return commentForm(this, <?echo $hd->useSecurityImage()? 'true' : 'false';?>);;">
	<?if($failed) {?><p id="feedback" class="highline"><?echo $feedback;?></p> <?}?>
	<table border="0" cellspacing="0" cellpadding="0">
	<tr><td><div class="input_container">
	<input class="text" type="text" name="author" value="<?if($failed) { echo $_POST['author']; } else {echo "Autore"; } ?>"  onfocus="clearField(this, 'Autore'); <?if($hd->useSecurityImage()) {?> $('captcha_widget').show() <?}?>" onblur="restoreField(this, 'Autore')" />
	</div>
	<div id="textarea_container">
	<textarea name="body" id="txt" onfocus="clearField(this, 'Messaggio'); <?if($hd->useSecurityImage()) {?> $('captcha_widget').show() <?}?>" onblur="restoreField(this, 'Messaggio')"><?if($failed) { echo $_POST['body']; } else {echo "Messaggio"; } ?></textarea>
	</div>
	<!--<div class="input_container">
	<input class="text" type="text" name="code" id="code" value="Codice" onfocus="$('code_img').show(); clearField(this, 'Codice');" onblur="restoreField(this, 'Codice')" />
	</div>-->
	</td>
	<td><? include("../module/editor.inc.php"); ?></td></tr>
</form>
</table>
<?if($hd->useSecurityImage()) {?>
<script type="text/javascript" charset="utf-8">
	var RecaptchaOptions = {
		theme:'custom',
		tabindex:2,
		lang:'en',
		custom_theme_widget:'captcha_widget'
	};
</script>
<div id="captcha_widget" style="display:none">
	<?//echo recaptcha_get_html($hd->getPublicKey());?>
	<!--<img class="pointer" id="security_image" src="<?echo $base_url;?>module/security.inc.php" alt="Immagine di sicurezza" />-->
	<div id="recaptcha_image" style="width:300px; height:57px"></div>
	<input type="text" name="recaptcha_response_field" id="recaptcha_response_field" />
</div>
<?}?>
<input type="hidden" name="content" value="<?echo $_GET['id'];?>" />
<p><input type="submit" value="Conferma &rarr;" /></p>
</div>
<div class="comment_bottom"></div>

</div>